package org.zoffy.job;

import jakarta.annotation.Resource;
import org.apache.http.client.HttpClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;
import org.zoffy.utils.HttpUtils;

import java.io.IOException;

@Component
public class HotTopicJob {

    @Value("${api.hot-topic.douyin-url}")
    private String API_HOTTOPIC_DOUYIN;
    @Value("${api.hot-topic.weibo-url}")
    private String API_HOTTOPIC_WEIBO;

    public void getDouyinHotTopic() throws IOException {
        String res = HttpUtils.get(API_HOTTOPIC_DOUYIN);
        System.out.println(res);
    }

    public void getWeiboHotTopic() throws IOException {
        String res = HttpUtils.get(API_HOTTOPIC_WEIBO);
        System.out.println(res);
    }
}
